<?php

namespace app\validate;

use think\Validate;

class PlanTasks extends Validate
{
    protected $rule = [
        'custom_name|客户名称'=>['require'],
        'plan_date|计划沟通时间' =>['require'],
        'plan_content|计划沟通内容'=>['require'],
//        'abutment|对接人'=>['require'],
//        'u_mobile|对接人联系方式'=>['require'],
    ];

    public function sceneTasks(): PlanTasks
    {
        return $this->only(['custom_name,plan_date,plan_content']);
    }

    //自动条件验证
    public function sceneAutoWhere()
    {
        return $this->only(['field','field2','where','value'])
            ->append('field|字段','require')
//            ->append('field2|条件','require')
            ->append('where|条件','require');
//            ->append('value|值','require');
    }


}